<template>
    <div>

        <img ref="aaa" src="@/assets/img/20200223132215_ViS3r.png" alt="">
        <br>
        {{ c }}
    </div>
</template>
<script>
export default {

    data() {
        return {
            c: '',
        }
    },
    created() {
        this.c = '1234567'
        console.log(this.c)
        let av = '1234567'
        let aab = av
        aab = '123'
        console.log(av)
        console.log(aab)
        let v = { a: 1, b: 2 }
        let vv = v
        v.a = 2
        console.log(vv)
        console.log(v)
        let vvv = JSON.parse(JSON.stringify(v))
        vvv.a = 3
        vvv.b = 4
        console.log(vvv)
        console.log(v)

        let ajaj = {}
        Object.assign(ajaj, v)
        ajaj.a = 5
        ajaj.b = 6
        console.log(ajaj)
        console.log(v)
        let afhsafe = JSON.parse(JSON.stringify(v))
        afhsafe.a = 7
        console.log(afhsafe)
        console.log(v)
        let fdh = {}
        function deepCopy(obj) {
            for (let key in obj) {
                fdh[key] = typeof obj[key] === 'object' ? deepCopy(obj[key]) : obj[key];
            }
            return fdh;
        }
        fdh = deepCopy(v)
        fdh.a = 8
        console.log(fdh)
        console.log(v)
    },
    mounted() {
        

        // this.c = '1234567'
        let a = this.$refs.aaa
        console.log(a);
    }

}

</script>